package com.mdd.common.validate.business;

import com.mdd.common.vo.LoadDataVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Data
@ApiModel("商户创建参数")
public class BusinessApplyValidate implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotEmpty(message = "请选择门头/logo")
    @ApiModelProperty(value = "门头照")
    private List<String> logoUrl;

    @ApiModelProperty(value = "营业执照")
    private List<String> licenseUrl;

    @NotNull(message = "请输入商家名称")
    @ApiModelProperty(value = "名称")
    private String businessName;

    @Length(min = 11, max = 11, message = "手机号只能为11位")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    @ApiModelProperty(value = "手机号码")
    private String mobile;

    @NotEmpty(message = "请选择行业分类")
    @ApiModelProperty(value = "行业分类")
    private List<LoadDataVo> categoryList;

    @NotNull(message = "请选择省")
    @ApiModelProperty(value = "省")
    private Integer provinceId;
    private String provinceName;

    @NotNull(message = "请选择市")
    @ApiModelProperty(value = "市")
    private Integer cityId;
    private String cityName;

    @NotNull(message = "请选择区")
    @ApiModelProperty(value = "区")
    private Integer districtId;
    private String districtName;

    @NotNull(message = "请选择地理位置")
    @ApiModelProperty(value = "详细地址")
    private String address;

    @ApiModelProperty(value = "经度")
    private BigDecimal longitude;

    @ApiModelProperty(value = "纬度")
    private BigDecimal latitude;

    @NotNull(message = "请输入门牌号")
    @ApiModelProperty(value = "门牌号")
    private String info;

    @NotNull(message = "请输入营业时间")
    @ApiModelProperty(value = "营业时间")
    private String businessTime;

    @NotNull(message = "请输入商家介绍")
    @ApiModelProperty(value = "商家介绍")
    private String content;

    @ApiModelProperty(value = "微信二维码")
    private List<String> wechatUrl;

    @ApiModelProperty(value = "微信号")
    private String wechat;

    @ApiModelProperty(value = "门店状态:1-启用;0-停用;2-待审核;3-未通过;4-待付款")
    private Integer status = 4;

    @NotNull(message = "请选择入驻版本")
    @ApiModelProperty(value = "版本id")
    private Integer goodId;

    private Integer userId;

    @ApiModelProperty("订单来源: [1=微信小程序]")
    private Integer orderSource;

    @ApiModelProperty(value = "订单类型 [1=普通订单 , 2=秒杀订单]")
    private Integer orderType = 1;

    @ApiModelProperty("订单归属")
    private String sourceId;

    @ApiModelProperty("订单归属类型")
    private String sourceType;

}
